class CreateAdminTelevisions < ActiveRecord::Migration
  def change

    create_table "televisions", :force => true do |t|
      t.string   "name"
      t.integer  "category_id"
      t.string   "logo"
      t.string   "play_url"
    end

    add_index :televisions, :category_id

    drop_table :programs

    create_table :programs do |t|
      t.integer :television_id
      t.integer :city_id
      t.string :sid
      t.integer :province_id
      t.integer  "freq"
    end
    add_index :programs, :television_id
    add_index :programs, :city_id
    add_index :programs, :province_id
  end
end
